
var tour;

apiready = function() {
    
   	tour = api.pageParam.tour;
   	
   	$api.text($api.byId('type'), tour.type);
   	$api.text($api.byId('name'), tour.name);
   	$api.text($api.byId('price'), tour.price);
   	$api.text($api.byId('tags'), tour.tags);
   	$api.text($api.byId('godate'), tour.godate);
   	$api.html($api.byId('proDefImg'), '<img src="'+serviceUrl+tour.proDefImg+'" style="width:100%">');

}


function tel(){
//	alert('打电话');
	
	var tel = tour.tel;
	
	if(tel){
		api.call({type: 'tel_prompt', number: tel});
	}else{
		toast('无号码');
	}
}


function buy(){
//	alert('buy');

	openWin('tour_order', {'tour':tour});
}


function feiyongshuoming(){
//	alert('费用说明');
	
	openWin('tour_explain', {'title':'费用说明', 'content':tour.costdesc});
}


function xingchenggailan(){
//	alert('行程概览');

	openWin('tour_explain', {'title':'行程概览', 'content':tour.trip});
}


function jiudianshuoming(){
//	alert('酒店说明');
	
	openWin('tour_explain', {'title':'酒店说明', 'content':tour.hoteldesc});
}


function tuwenshuoming(){
//	alert('图文说明');

	openWin('tour_explain', {'title':'图文说明', 'content':tour.description});
}


function yudingxuzhi(){
//	alert('预订须知');

	openWin('tour_explain', {'title':'预订须知', 'content':tour.notice});
}

